package kt.com.bilin.coin.ui.activity

import android.os.Bundle
import com.bilin.coin.R
import kotlinx.android.synthetic.main.activity_message_details.*
import kt.com.bilin.coin.bean.UserMsgBean
import kt.com.bilin.coin.helper.InjectBundle
import kt.com.bilin.coin.listener.OnStartActivityListener

class MessageDetailsActivity : BaseActivity(R.layout.activity_message_details) {
    companion object {
        private const val USER_MSG = "mUserMsgBean"
        fun open(mUserMsgBean: UserMsgBean, listener: OnStartActivityListener) {
            listener.goActicity(MessageDetailsActivity::class.java, Bundle().apply {
                putParcelable(USER_MSG, mUserMsgBean)
            })
        }
    }

    private val mUserMsgBean: UserMsgBean by InjectBundle { UserMsgBean() }
    override fun initView() {
        mUserMsgBean.run {
            tvMsgTitle.text = replyTitle
            txMsgDate.text = replyTime
            tvContent.text = replyContent
        }
    }
}